package com.kgc.novel.domain.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 用户管理对象 book_user
 *
 * @author java81
 * @date 2023-05-09
 */
@Getter
@Setter
@NoArgsConstructor
@TableName(value = "book_user")
@Api(tags = "用户管理类")
public class BookUser implements Serializable
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    @TableId(value = "id",type = IdType.ASSIGN_ID)
    private String id;

    /** 随机生成 */
    @TableField(value = "nick_name")
    @ApiParam("昵称")
    private String nickName;

    /** 抖音id */
    @TableField(value = "openid")
    @ApiParam("抖音id")
    private String openid;

    /** 会员到期时间；为空不是会员 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @TableField(value = "expires_in")
    @ApiParam("抖音id")
    private Date expiresIn;

    /** 用户金额；收益加；提现减 */
    @TableField(value = "amount")
    @ApiParam("用户金额")
    private BigDecimal amount;

    /** 邀请码；例如：eur39y */
    @TableField(value = "referral_code")
    @ApiParam("邀请码")
    private String referralCode;

    /** 头像地址 */
    @TableField(value = "avatar")
    @ApiParam("头像地址")
    private String avatar;

    /** 手机号 */
    @TableField(value = "phone_number")
    @ApiParam("手机号")

    private String phoneNumber;
    /**
     * 会员状态 0：游客 1：普通博主 2：高级博主
     */
    @TableField(value = "status")
    @ApiParam("会员状态")
    private Byte status;
    /**
     * 会话密钥
     */
    @TableField(value = "session_key")
    @ApiParam("会话密钥")
    private String sessionKey;
}
